home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / answrbok / 8_7.lha / 8_7 / 8_7_init.c next >
Text File  |  1993-08-08  |  625b  |  21 lines

  1. * Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
  2. * The C++ Answer Book */
  3. * Tony Hansen */
  4. * All rights reserved. */
  5. / declare a suitable amount of buffer space
  6. tatic char cout_buf[1], cerr_buf[1], cin_buf[1];
  7.  
  8. / Make filebuf's to manage that space.
  9. / Bind it to the UNIX FILE pointers
  10. tatic filebuf cout_file
  11.    (stdout, cout_buf, sizeof(cout_buf));
  12. tatic filebuf cerr_file
  13.    (stderr, cerr_buf, sizeof(cerr_buf));
  14. tatic filebuf cin_file
  15.    (stdin, cin_buf, sizeof(cin_buf));
  16.  
  17. / make the streams providing the user interface
  18. stream cout(&cout_file);
  19. stream cerr(&cerr_file);
  20. stream cin(&cin_file);
  21.